package com.zcy.pmp.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  部门实体类
 * </p>
 *
 * @author lucker
 * @date 2023/11/28 15:20
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Builder
@ApiModel("部门实体类")
public class Department {

    @ApiModelProperty("部门ID")
    @Excel(name = "部门ID",groupName = "部门")
    private Long id;

    @ApiModelProperty("部门名称")
    @Excel(name = "部门名称",groupName = "部门")
    private String name;

    @ApiModelProperty("部门简介")
    @Excel(name = "部门简介",groupName = "部门")
    private String intro;

    @ApiModelProperty("部门创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("部门更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @ApiModelProperty("部门路径")
    private String path;

    @ApiModelProperty("部门状态")
    private Integer state;

    @ApiModelProperty("部门经理")
    private Employee manager;

    @ApiModelProperty("部门父级")
    private Department parent;

    @ApiModelProperty("子部门")
    private List<Department> children;


}
